package seeders

import (
	"github.com/goravel/framework/facades"
	"goravel/app/models"
)

type ParkingSeeder struct {
}

// Signature The name and signature of the seeder.
func (s *ParkingSeeder) Signature() string {
	return "ParkingSeeder"
}

// Run executes the seeder logic.
func (s *ParkingSeeder) Run() error {
	parkings1 := []models.Parking{
		{
			ParkingType: "原料",
			No:          "1",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "2",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "3",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "4",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "5",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "6",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "7",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "8",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "9",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "10",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "11",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "12",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "13",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "14",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "15",
			State:       "空闲",
		},
		{
			ParkingType: "原料",
			No:          "16",
			State:       "空闲",
		},
	}
	facades.Orm().Query().Model(&models.Parking{}).Create(&parkings1)
	parkings2 := []models.Parking{
		{
			ParkingType: "成品",
			No:          "1",
			State:       "空闲",
		},
		{
			ParkingType: "成品",
			No:          "2",
			State:       "空闲",
		},
		{
			ParkingType: "成品",
			No:          "3",
			State:       "空闲",
		},
		{
			ParkingType: "成品",
			No:          "4",
			State:       "空闲",
		},
		{
			ParkingType: "成品",
			No:          "5",
			State:       "空闲",
		},
		{
			ParkingType: "成品",
			No:          "6",
			State:       "空闲",
		},
	}
	facades.Orm().Query().Model(&models.Parking{}).Create(&parkings2)
	return nil
}
